﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Web.login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="~/css/estilos.css?<%=Web.Util.Common.Aleatorio() %>" rel="stylesheet" type="text/css" />
    <link href="~/css/load.css?<%=Web.Util.Common.Aleatorio() %>" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src='<%=ResolveClientUrl("~/js/LockScreen.js") %>'></script>

    <!-- Inicio Impromptu -->
    <link href="~/css/jquery-impromptu.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src='<%=ResolveClientUrl("~/js/jquery.min.js") %>'></script>
    <script type="text/javascript" src='<%=ResolveClientUrl("~/js/jquery-impromptu.js") %>'></script>
    <!-- Fin Impromptu -->
    <script type="text/javascript">
        $(window).ready(function () {
            /* Aquí podría filtrar que controles necesitará manejar,
            * en el caso de incluir un dropbox $('input, select');
            */
            tb = $('input');
            tc = $('select');

            $(tb).keypress(enter2tab);
            $(tc).keypress(enter2tab);
        });

        function enter2tab(e) {
            if (e.keyCode == 9) {
                cb = parseInt($(this).attr('tabindex'));

                if ($(':input[tabindex=\'' + (cb + 1) + '\']') != null) {
                    $(':input[tabindex=\'' + (cb + 1) + '\']').focus();
                    $(':input[tabindex=\'' + (cb + 1) + '\']').select();

                    e.preventDefault();

                    return false;
                }

                if ($(':select[tabindex=\'' + (cb + 1) + '\']') != null) {
                    $(':select[tabindex=\'' + (cb + 1) + '\']').focus();
                    $(':input[tabindex=\'' + (cb + 1) + '\']').select();

                    e.preventDefault();

                    return false;
                }
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server" defaultbutton="btnEntrar">
    <div align="center">
        <table width="800px">
            <tr>
                <td class="header2">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%">
                        <tr>
                            <td width="265px" height="84px"></td>
                            <td width="535" height="84px" valign="top">
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tr>
                                        <td height="19px">
                                        
                                        </td>
                                    </tr>
                                    <tr>
                                        <td height="46px" align="right">
                                            <table>
                                                <tr>
                                                    <td style="color: black; font-size: small; text-align: center; font-weight: bold;">Usuario</td>
                                                    <td style="color: black; font-size: small; text-align: center; font-weight: bold;">Clave</td>
                                                    <td width="49px" rowspan="2" style=" width: 70px; vertical-align: bottom;">
                                                        <asp:Button ID="btnEntrar" runat="server" Text="Entrar" CssClass="in" TabIndex="4"
                                                            onclick="btnEntrar_Click" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <asp:TextBox ID="txtUsuario" runat="server" CssClass="txtLogin" Width="64px" MaxLength="8" TabIndex="1" />
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtClave" runat="server" TextMode="Password" CssClass="txtClave" Width="64px" TabIndex="2" MaxLength="8" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" align="right">
                                                        <asp:CheckBox ID="chkRememberMe" TextAlign="Left" runat="server" Text="Recordar" TabIndex="3"/>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="info">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td class="app">
                    <table width="100%">
                        <tr>
                            <td class="menu">
                                &nbsp;
                            </td>
                            <td class="form">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
